package org.numanint.code;

import java.util.HashMap;


public class ListJspGenerator extends Generator {
	
	public ListJspGenerator(GeneratorProperties p){
		super(p);
	}
	
	public void generator(ReverseEngineer reveng) throws Exception{	
			HashMap<String,Object> data = new HashMap<String,Object>();
			for(int i=0;i<reveng.getTableClasss().length;i++){	
				String className = ConventUtils.t2c(reveng.getTableClasss()[i].getTableName());		
				HashMap<String,Object> tableMap = new HashMap<String,Object>();
				tableMap.put("properties", getProperties());
				tableMap.put("className", className);		
				tableMap.put("pk", reveng.getTableClasss()[i].getPkArray().get(0).getPkClassName());	
				data.put(ConventUtils.lowerFirstChar(className)+"/list.jsp", tableMap);
			} 
			
			super.setData(data);
			super.generator();
		
	}	
}
